Cascading style sheets provide website developers with control over the visual appearance, style, and positioning of text and other elements in web pages. Cascading style sheets typically include instructions or rules that describe how a browser should render any instance of a particular element on a webpage. For example, style sheets can provide instructions for how hypertext headers, links, or text should appear on the webpage. Developers may use cascading style sheets to create templates for cascading these style properties and rules to structured documents. The use of cascading style sheets separates the coordination of the style of the documents from the content of the document, thereby simplifying web authoring and site maintenance.
The style sheets are referred to as cascading because multiple style sheets can be applied to a same webpage. When multiple rules exist in one or more style sheets that are applied to a webpage, multiple rules may apply to a single element. In such a case, cascading style sheets assign a weight or specificity to each style rule and the rule with the greatest weight takes precedence.
In order to dynamically stylize an element at runtime, an “inline” declaration can be used directly on the content of the document, as opposed to within a style sheet. This is convenient because the declaration has more specificity than style declarations in any of the rules in the style sheet. However, an “in-line” style declaration will only affect a single element, and cannot be reused by other elements. Additionally, “in-line” styles are applied directly to elements, which mean they are not contained within style sheet objects.
Accordingly, it is desirable to provide methods and systems were users may style elements dynamically using cascading style sheets. Furthermore, other desirable features and characteristics of the present disclosure will become apparent from the subsequent detailed description and the appended claims, taken in conjunction with the accompanying drawings and the foregoing technical field and background.